<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定时跳转</title>
    <script src="js/jquery-3.2.1.min.js"></script>
    <style>
        body{background:gray;}
      div{margin:20px auto;width:350px;height:150px;border:1px solid #000;background:white;padding:10px;}
      h2{text-align:center;}
      span{font-size:150%;color:red;margin:0 10px;}
    </style>
</head>
<body>
	<div>
    	  <h2>提交成功</h2>
    	  <a href="http://www.example.com">
    	    <span id="seconds">3</span>秒后系统会自动跳转，也可单击此链接跳转
    	  </a>
    	</div>
       
    <script>
        $(function(){
            var timing =setInterval(timing,1000);
            var second=$("#seconds").html();
            second--;
            function timing(){
                $("#seconds").html(second);
                second--;
                if(second==-1){
                    clearInterval(second);
                    $(location).prop("href","http://www.example.com");
                }
            }
        })
    </script>
    
</body>
</html>